<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>echarts</title>
  <script src="./echarts.min.js"></script>
</head>
<body>
  <div id="main" style="width: 1600px;height:400px;"></div>
  <script type="text/javascript">
    // 基于准备好的dom，初始化echarts实例
    var myChart = echarts.init(document.getElementById('main'));

    // 指定图表的配置项和数据
    var option = {
        legend: {},
        tooltip: {},
        dataset: {
            source: [
                ['product', '2015', '2016', '2017', '2018', '2019'],
                ['Matcha Latte', 43.3, 85.8, 93.7, 1000, 10],
                ['Milk Tea', 83.1, 73.4, 55.1, 34.5, 16.7],
                ['Cheese Cocoa', 86.4, 65.2, 82.5, 56.7, 34.5],
                ['Walnut 2', 72.4, 53.9, 39.1, 100.1, 300.2],
                ['Walnut 3', 72.4, 53.9, 39.1, 100.1, 300.2],
                ['Walnut 4', 72.4, 53.9, 39.1, 100.1, 300.2],
            ]
        },
        xAxis: {type: 'category'},
        yAxis: {},
        // Declare several bar series, each will be mapped
        // to a column of dataset.source by default.
        series: [
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'},
            {type: 'bar'}
        ]
    }

    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
  </script>
</body>
</html>